/*
 * @Descripttion: im接口
 * @Author: xinqiao lxq1990.0716@qq.com
 * @Date: 2025-04-17
 * @LastEditors: xinqiao lxq1990.0716@qq.com
 * @LastEditTime: 2025-04-27
 */

import request from '../request'

/** 客户端发送聊天消息 */
export const requestSendChatMsg = (data: SendChatMsgTypes.IRequest) => {
  return request.post<IBaseResponse<SendChatMsgTypes.IResponse>>('/business/datamarket/imMessage/app/sendChatMsg', data)
}

/** 聊天消息分页（聊天对象列表） */
export const requestImMessagePage = (data: ImMessagePageTypes.IRequest) => {
  return request.post<IPaginationResponse<ImMessagePageTypes.IResponse[]>>('/business/datamarket/imMessage/imMessagePage', data)
}

/** 私聊聊天消息分页（与某个聊天对象的聊天内容） */
export const requestChatImMessagePage = (data: ChatImMessagePageTypes.IRequest) => {
  return request.post<IPaginationResponse<ChatImMessagePageTypes.IResponse[]>>('/business/datamarket/imMessage/chatImMessagePage', data)
}
